package com.qububu.emporium.comment.dto;

import com.qububu.utils.DateUtil;
import com.qububu.utils.ParamConverter;
import com.qububu.utils.SystemUtil;

public class GoodsCommentInfoDto {

	private String msgId;
	private String msgGoodsPoint;
	private String msgContent;
	private String msgCreateDttm;
	private String msgCreateIp;
	private String msgGoodsPicUrl;
	private String msgAgreeNum;
	private String goodsId;
	private String userId;
	private String parentId;
	
	/**
	 * 针对商品评论的回复
	 * */
	public GoodsCommentInfoDto(String msgId, String goodsId, String userId, String parentId) {
		
		this.msgId = msgId;
		this.goodsId = goodsId;
		this.userId = userId;
		this.parentId = parentId;
	}
	
	public GoodsCommentInfoDto(long msgId, long goodsId, long userId, long parentId) {
		
		this.msgId = SystemUtil.encrypt(String.valueOf(msgId) );
		this.goodsId = SystemUtil.encrypt(String.valueOf(goodsId) );
		this.userId = SystemUtil.encrypt(String.valueOf(userId) );
		this.parentId = SystemUtil.encrypt(String.valueOf(parentId) );
	}
	
	public String getMsgId() {
		return msgId;
	}

	/**
	 * @功能 set,get
	 */
	public String getMsgGoodsPoint() {
		return msgGoodsPoint;
	}
	public void setMsgGoodsPoint(String msgGoodsPoint) {
		this.msgGoodsPoint = msgGoodsPoint;
	}
	public String getMsgContent() {
		return msgContent;
	}
	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}
	public String getMsgCreateDttm() {
		return msgCreateDttm;
	}
	public void setMsgCreateDttm(String msgCreateDttm) {
		this.msgCreateDttm = msgCreateDttm;
	}
	public String getMsgCreateIp() {
		return msgCreateIp;
	}
	public void setMsgCreateIp(String msgCreateIp) {
		this.msgCreateIp = msgCreateIp;
	}
	public String getMsgGoodsPicUrl() {
		return msgGoodsPicUrl;
	}
	public void setMsgGoodsPicUrl(String msgGoodsPicUrl) {
		this.msgGoodsPicUrl = msgGoodsPicUrl;
	}
	public String getMsgAgreeNum() {
		return msgAgreeNum;
	}
	public void setMsgAgreeNum(String msgAgreeNum) {
		this.msgAgreeNum = msgAgreeNum;
	}
	public String getGoodsId() {
		return goodsId;
	}
	public String getUserId() {
		return userId;
	}
	public String getParentId() {
		return parentId;
	}
	
	/**
	 * @功能 时间转换
	 * @return
	 */
	public String showMsgCreateDttm(){
		return DateUtil.formatToDTTMString(ParamConverter.convertToInteger(msgCreateDttm));
	}
	
}
